package com.dycx.user.service;

import com.dycx.common.RestResponse;
import com.dycx.user.dto.UserDTO;
import com.dycx.user.vo.UserVO;

import javax.servlet.http.HttpServletRequest;


public interface UserAuthService {

    String creatJWT(Integer uid);

    /**
     * 后台登录
     *
     * @param userDto
     * @return
     */
    String login(UserDTO userDto);

    String smsLogin(UserDTO dto);

    RestResponse<String> wxMpLogin(String code);

    /**
     * 微信小程序登录
     *
     * @param code
     * @return
     */
    RestResponse<String> wxMiniLogin(String code);

    RestResponse<String> wxAppLogin(String code);

    Boolean register(UserDTO dto);


    /**
     * 验证是否有接口访问权限
     *
     * @param request
     * @return
     */
    RestResponse<String> auth(HttpServletRequest request);

    UserVO getTokenInfo(String token);
}
